<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>关键字条件搜索</title>
    <script src="/jquery-3.4.1.min.js"></script>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    <script src="/vue.min.js"></script>
</head>
<body>
<div id="resultmovie">
    <form id="escondition">
        <div class="container" style="margin-top: 100px">
            <div class="form-group col-md-8">
                <input type="hidden" name="index" value="movie">
                <input type="hidden" name="pageIndex" value="1">
                <input type="hidden" name="pageCount" value="3">
                <input type="text" name="keyword" class="form-control" placeholder="电影搜索">
            </div>
            <div class="form-group col-md-4">
                <input type="button" v-on:click="condition()" class="btn btn-primary" value="搜索"/>
                <input type="button" v-on:click="condihigh()" class="btn btn-warning" value="高亮搜索"/>
            </div>
        </div>
        <div class="container"  >
            <div v-for="film in list" style="margin-bottom: 50px">
                <div v-html="film.filmtitle"></div><div v-html="film.filmscoring"></div>
                <div v-html="film.filmactors"></div>
                <div v-html="film.filmdescription"></div>
            </div>
        </div>
    </form>
</div>
    <script>
        var vue = new Vue({
            el:"#resultmovie",
            data:{
                message:{},
                list:[]
            },
            methods:{
                condition:function () {
                    var _data = this;
                    $.ajax({
                        url:"/getbycondition",
                        data:$("#escondition").serialize(),
                        type:"post",
                        dataType:"json",
                        success:function (data) {
                            _data.list = data.list;
                        }
                    })
                },
                condihigh:function () {
                    var _data = this;
                    $.ajax({
                        url:"/getbyconditionhigh",
                        data:$("#escondition").serialize(),
                        type:"post",
                        dataType:"json",
                        success:function (data) {
                            _data.list = data.list;
                        }
                    })
                }
            }
        });
    </script>
</body>
</html>